<?php

include_once '../../Core/Conexion.php';
include_once '../../Core/ControladorSet.php';
include_once '../../Core/InterfazDatos.php';
include_once '../../Admin/entidades/CursoProfesor.php';
include_once '../../Admin/entidades/Alumno.php';
///****
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of lista
 *
 * @author home
 */
class vista extends ControladorSet {

    public function buscarValores() 
    {   
        $this->diccionario['idAsignatura']=$_GET['codigo'];
        $consultaAlumnos=$this->conexion->consultaLibre("SELECT * FROM CALIFICACION C,ALUMNO A WHERE A.IDALUMNO=C.IDALUMNO AND C.IDASIGNATURA='".$_GET['codigo']."'ORDER BY APELLIDOS,NOMBRES DESC");
        $filaAlumnos=mysql_fetch_array($consultaAlumnos);
        $cadena="";
        if(mysql_num_rows($consultaAlumnos)>0)
        {
        do
            {
                $cadena=$cadena."<tr>";
                $cadena=$cadena."<td>".$filaAlumnos['IDALUMNO']."</td>";
                $cadena=$cadena."<td>".$filaAlumnos['CODIGOAUXILIAR']."</td>";
                $cadena=$cadena."<td>".$filaAlumnos['APELLIDOS']." ".$filaAlumnos['NOMBRES']."</td>";
                $cadena=$cadena."<td><input class='boton2'  name='' type='button' value='eliminar' onClick='eliminar(".$filaAlumnos['IDALUMNO'].",".$_GET['codigo'].");' ></td>";
                $cadena=$cadena."</tr>";
            }while($filaAlumnos=mysql_fetch_array($consultaAlumnos));
        }
        $this->diccionario['tablaAlumnos']=$cadena;
    }
      
    
     public function setValorSesion() 
    {
 
        $this->valorSesion=array("profe");
        
    }

    public function setDiccionario() {
        
          $this->diccionario = array(
            "Materias" => "vacio",
            "cursoProfesor"=>"",
            "idAsignatura"=>"",
            "tablaAlumnos"=>"",
            
        );
    }
    
    
   //put your code here
}

$controlador = new vista('nuevoVista.php');
$controlador->rederizarPagina();

